#ifndef TREE
#define TREE

#include <stdio.h>

template<typename T>
struct NodeStructure {
  NodeStructure() : left(NULL), right(NULL) { }

  bool IsLeaf() const { return left == NULL && right == NULL; }

  T *left;
  T *right;
};

struct Node : NodeStructure<Node> {
  Node(int key) : key(key) { }
  Node() : key(0) { }
  int key;
};

void DeleteTree(Node **root);

#endif // TREE

